cmake_minimum_required(VERSION 3.22)
project(srp6)

set(CMAKE_CXX_STANDARD 17)

set(OPENSSL_EXPECTED_VERSION 1.0.0)

# set deps directory
list(APPEND CMAKE_MODULE_PATH "${CMAKE_SOURCE_DIR}/cmake")

add_subdirectory(deps)

include_directories(
  ${OPENSSL_INCLUDE_DIR}
)

#add_library(srp6 SHARED libsrp6.cpp BigNum.cpp BigNum.h
#        Auth/BigNumber.cpp
#        Auth/CryptoHash.h
#        Auth/SRP6.h
#        Auth/SRP6.cpp)

add_executable(srp6 libsrp6.cpp BigNum.cpp BigNum.h
        Auth/BigNumber.cpp
        Auth/CryptoHash.h
        Auth/SRP6.h
        Auth/SRP6.cpp)

#target_link_libraries(srp6 ssl crypto)
target_link_libraries(srp6 openssl)

install(TARGETS srp6 DESTINATION ${CMAKE_SOURCE_DIR})
